﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace ZFSDomain.Interface.Base
{
    /// <summary>
    /// 主窗口接口
    /// </summary>
    public interface IModel
    {
        /// <summary>
        /// 关联数据上下文
        /// </summary>
        /// <typeparam name="TViewModel"></typeparam>
        /// <param name="viewModel"></param>
        void BindViewModel<TViewModel>(TViewModel viewModel) where TViewModel : ViewModelBase;

        /// <summary>
        /// 关联数据上下文(默认)
        /// </summary>
        void BindDefaultViewModel(int? authValue);
        
        /// <summary>
        /// 获取主窗口
        /// </summary>
        /// <returns></returns>
        UserControl GetView();
    }

    /// <summary>
    /// 弹窗接口
    /// </summary>
    public interface IModelDialog
    {
        /// <summary>
        /// 关联数据上下文
        /// </summary>
        /// <typeparam name="TViewModel"></typeparam>
        /// <param name="viewModel"></param>
        void BindViewModel<TViewModel>(TViewModel viewModel) where TViewModel : ViewModelBase;
        
        /// <summary>
        /// 弹出窗口
        /// </summary>
        bool? ShowDialog();

        /// <summary>
        /// 关闭窗口
        /// </summary>
        void Close();

    }
}
